Technical Report EJP-200712-1 Cooperative Aspect-Oriented Programming

نویسندگان

  • Kevin Hoffman
  • Patrick Eugster
چکیده

Aspect-oriented programming (AOP) seeks to improve software modularity via the separation of cross-cutting concerns. AOP proponents often advocate a development strategy where programmers write the main application (base code), ignoring cross-cutting concerns, and then aspect programmers, domain experts in their specific concerns, weave in the logic for these more specialized cross-cutting concerns. This purely oblivious strategy, however, has empirically been shown to tightly couple aspects to base code in many cases, hindering aspect modularity and reuse. In essence, the more intricate the weaving between the cross-cutting concern and the base code (lexically and/or semantically), the harder it becomes to: (a) robustly specify how to weave the aspects in at the required points, (b) capture interactions between aspects and base code, and (c) preserve the correct weaving as the base code evolves. We propose an alternate methodology, termed cooperative aspect-oriented programming (Co-AOP), where complete lexical separation of concerns is not taken as an absolute requirement. Instead, cross-cutting concerns are explicitly modeled as abstract interfaces through explicit join points (EJPs). Programmers specify where these interfaces interact with base code either through explicit lexical references or via traditional oblivious aspects. This explicit awareness allows base code and aspects to cooperate in ways that were previously not possible: arbitrary blocks of code can be advised, advice can be explicitly parameterized, base code can guide aspects in where to apply advice, and aspects can statically enforce new constraints upon the base code that they advise. These new techniques allow aspect modularity and program safety to increase, and bring us towards a cooperative AOP paradigm. We illustrate our methodology via an example on transactions, and also give an initial evaluation of cooperative AOP through an empirical study on program extensibility comparing both the traditional and cooperative AOP methodologies. Initial results show that cooperative AOP techniques result in code that is less complex with lower overall coupling, facilitating extensibility.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Bridging Java and AspectJ through Explicit Join Points TECHNICAL REPORT ejp-200705-1

Through AspectJ, aspect-oriented programming (AOP) is becoming of increasing interest and availability to Java programmers as it matures as a methodology for improved software modularity via the separation of cross-cutting concerns. AOP proponents often advocate a development strategy where Java programmers write the main application, ignoring cross-cutting concerns, and then AspectJ programmer...

متن کامل

Declarative Events for Object-Oriented Programming

In object-oriented designs inversion of control is achieved by an event-driven programming style based on imperatively triggered events. An alternative approach can be found in aspect-oriented programming, which de nes events as declarative queries over implicitly available events. This helps to localize de nition of events and avoid preplanning, but lacks a clean integration with object-orient...

متن کامل

A model and a tool for Event-based Aspect-Oriented Programming (EAOP)

Aspect-oriented programming promises support for incremental program development by providing new means for modularization of crosscutting code. In this paper, we briefly introduce a general model for aspect-oriented programming, Event-Based AOP (first introduced in [DMS01a]), which is based on monitoring of execution events. This model extends previous approaches by enabling the systematic tre...

متن کامل

The abc Group Building the abc AspectJ compiler with Polyglot and Soot abc Technical Report No . abc - 2004 - 4

Aspect-oriented programming and the development of aspect-oriented languages are rapidly gaining momentum, and the advent of this new kind of programming language provides interesting challenges for compiler developers, both in the frontend semantic analysis and in the backend code generation. This paper is about the design and implementation of the abc compiler for the aspect-oriented language...

متن کامل

Aspect-Oriented Approach to Implement Message Handler in Multi-agent Systems

This paper focuses on message handling in multiagent systems. The proposed approach uses aspect-oriented programming to separate message handling from other agent concerns, thus increasing system’s modularity and simplifying modification and expansion. To illustrate the proposed approach in practice, a prototype of a simple knowledge base agent model is implemented. The prototype is built on to...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008